import { Information } from 'information-model.js';

var information = new Information();

Page({
  data: {
    currentTab: 0
  },
  onLoad: function () {
    this._loadData();
  },
  _loadData: function (callback) {
    var that = this;
    //获得banner信息
    
  },
  toInformationDetailsArticle: function (e) {
    wx.navigateTo({
      url: '../information-details/information-details'
    });
  },
  toInformationDetailsVideo: function (e) {
    wx.navigateTo({
      url: '../information-video/information-video'
    });
  },
  navbarTap: function (e) {
    this.setData({
      currentTab: e.currentTarget.dataset.idx
    });
  }
})
/*Page({
	data: {
		banner: [],
		goods: [],
		bannerHeight: Math.ceil(400.0 / 750.0 * getApp().screenWidth),
    selected: "",
    currentTab: 0
	},
  onShareAppMessage: function (res) {
    console.log(res)
    if (res.from === 'button') {
      // 来自页面内转发按钮
      console.log(res.target)
    }
    return {
      title: '自定义转发标题',
      path: '/page/user?id=123',
      success: function (res) {
        console.log("转发成功") 
      },
      fail: function (res) {
        console.log("转发失败") // 转发失败
      }
    }
  },

  toInformationDetailsArticle: function (e) {  
      wx.navigateTo({
        url: '../information-details/information-details'
      });    
  },
  toInformationDetailsVideo: function (e) {
    wx.navigateTo({
      url: '../information-video/information-video'
    }); 
  },
  navbarTap: function (e) {
    this.setData({
      currentTab: e.currentTarget.dataset.idx
    });
  }
})*/